<ui:composition template="/WEB-INF/templates/public-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
	   <h:panelGroup style="width:100%;text-align:left;">
		 <h:outputText value="Recommend project perdiem request" styleClass="outputTextTitle"/>
		</h:panelGroup>
		<h:form>
	    <p:growl id="growl"></p:growl>
	    
	   
		<h:outputLabel value="Employee Details"     
						styleClass="outputTextSubTitle" />
		<br />
	    
	  
              <h:panelGrid columns="9" 
						columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned"
						style="width: 100%; background-color: #FFE4C4; border: 1px solid #F5AD66;">
				
				        <h:outputLabel value="Perdiem Request ID" />
						<h:outputLabel value=":" />
						<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectPerdiemCode}" styleClass="wamOutputLebel" style="font-weight: bold; color: #7892B7"/>
						
						<h:outputLabel value="Requested Date"/>
					    <h:outputText value=":" />
					    <h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.requestDate}"  readonly="true">
					    <f:convertDateTime pattern="dd/MM/yyyy"/>
					    </h:outputLabel> 


						<h:outputLabel value="#{msg['employeename.label']}" />
						<h:outputLabel value=":" />						
						<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.employee.firstName} #{approveProjectPerdiemsBean.projectPerdiem.employee.lastName}"
							styleClass="wamOutputLebel" />

						<h:outputLabel value="#{msg['employeeid.label']}" />
						<h:outputLabel value=":" />
						<h:outputLabel
							value="#{approveProjectPerdiemsBean.projectPerdiem.employee.employeeCode}"
							styleClass="wamOutputLebel" />

					
					<h:outputLabel value="#{msg['contactnumber.label']}"/>
                    <h:outputText value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.employee.telephone}" readonly="true" />
					
					<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
					<h:outputText value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.employee.telephone}" />
					
					<h:outputLabel value="#{msg['dept.label']}" />
				    <h:outputLabel value=":" />
				    <h:outputLabel  styleClass="wamOutputLebel" value="#{approveProjectPerdiemsBean.projectPerdiem.employee.moduleName}"/>
				    <h:outputLabel value="#{msg['designation.label']}" />
				    <h:outputLabel value=":" />
				    <h:outputLabel  styleClass="wamOutputLebel" value="#{approveProjectPerdiemsBean.projectPerdiem.employee.designation}"/>
					
					<h:outputLabel value="#{msg['recommendedby.lable']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel  readonly="true" />	
					<h:outputLabel value="#{msg['approvedby.lable']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="J.N.Rao" readonly="true" />
					
				
				</h:panelGrid>
				<p:spacer />
				<br/>
		      <h:outputLabel value="Project Assignment Details"
						styleClass="outputTextSubTitle"/>
		    
	          <h:panelGrid columns="9" 
						columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned"
						style="width: 100%; background-color: #FFE4C4; border: 1px solid #F5AD66;">
				
			
					<h:outputLabel value="#{msg['projectname.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectAssignment.project.projectName}" readonly="true" />					 	
					<h:outputLabel value="#{msg['clientaddress.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectAssignment.project.clientAddress}" readonly="true" />		
					
					
					
					<h:outputLabel value="#{msg['clientname.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectAssignment.project.client}" readonly="true"/>
					<h:outputLabel value="#{msg['clientlocation.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectAssignment.project.clientLocation}" readonly="true"/>
					
										
					<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectAssignment.project.contactPerson}" readonly="true" />
					<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectAssignment.project.contactNumber}" readonly="true" />
					
					<h:outputLabel value="#{msg['projectstratdate.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectAssignment.project.periodFrom}" readonly="true" >
					 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</h:outputLabel>
					<h:outputLabel value="#{msg['projectenddate.label']}"/>
					<h:outputLabel value=":" />
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectPerdiem.projectAssignment.project.periodTo}" readonly="true" >
					 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</h:outputLabel>
									
					
				
				</h:panelGrid>
				<p:spacer />
				<br/>
		     <h:outputLabel value="Allowance Details"
						styleClass="outputTextSubTitle" />
		    
		  
	         <h:panelGrid columns="3" 
						columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1, gridCellMiddleLeftAligned"
						style="">
				
			
				    <h:outputLabel value="#{msg['dailyallowance.lable']}"/>
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectAssignmentDetail.dailyAllowance}" readonly="true" >
					 
					</h:outputLabel>
					<h:outputLabel value="INR"/>
					
					<h:outputLabel value="#{msg['advanceamounttaken.lable']}"/>
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectAssignmentDetail.advanceAmount}" readonly="true" />
					<h:outputLabel value="INR"/>
					<h:outputLabel value="#{msg['roomrentadvance.lable']}"/>
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectAssignmentDetail.roomRentAdvance}" readonly="true" />
					<h:outputLabel value="INR"/>
					<h:outputLabel value="#{msg['roomrentpermonth.lable']}"/>
					<h:outputLabel value="#{approveProjectPerdiemsBean.projectAssignmentDetail.roomRentPerMonth}" readonly="true" />
					<h:outputLabel value="INR"/>		 

				
				</h:panelGrid>
			
				
			
				 <p:spacer />
				 <br/>
				 <h:outputLabel value="Details"
						styleClass="outputTextSubTitle" />
				 
				<h:panelGrid columns="4" 
						columnClasses="grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned, grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned, grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned "
						style="width: 100%">  
					<h:outputLabel value="Discription" style="font-style:bold;"/>
					<h:outputLabel value="From Date"/>
					<h:outputLabel value="To Date"/>
					<h:outputLabel value="Amount"/>
				
					
					<h:outputLabel value="Room Rent"/>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.roomRentFrom}"  readonly="true">
					  <f:convertDateTime pattern="dd/MM/yyyy"/>
					</p:inputText>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.roomRentTo}"  readonly="true">
					  <f:convertDateTime pattern="dd/MM/yyyy"/>
					</p:inputText>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.roomRentAmount}" readonly="true">
					
					</p:inputText>
					
					<h:outputLabel value="Per Diems"/>
					<p:calendar value="#{approveProjectPerdiemsBean.projectPerdiemDetail.perdiemFrom}"  >
					
					</p:calendar>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.perdeimTo}"  readonly="true">
					 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</p:inputText>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.perdeimAmount}" readonly="true">
					
					</p:inputText>
				
					
					<h:outputLabel value="Miscellaneous"/>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.miscFrom}"  readonly="true">
					 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</p:inputText>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.miscTo}"  readonly="true">
					  <f:convertDateTime pattern="dd/MM/yyyy"/>
					</p:inputText>
					<p:inputText value="#{approveProjectPerdiemsBean.projectPerdiemDetail.miscAmount}" readonly="true">
					 
					</p:inputText>
					
					
					 <h:outputLabel value="Miscellaneous Remarks"/>
					 <p:inputTextarea cols="20" rows="3" value="#{approveProjectPerdiemsBean.projectPerdiemDetail.miscRemarks}"></p:inputTextarea>
					
				    <h:inputHidden />
					<h:inputHidden/>
					
					
					
				
					
					<h:outputLabel value="Total Amount"/>
					<p:inputText  value="#{approveProjectPerdiemsBean.projectPerdiemDetail.totalAmount}"  readonly="true"/>
					<h:inputHidden />
					<h:inputHidden/>
					
					
					
					
				</h:panelGrid>
				<h:panelGrid columns="2" 
						columnClasses="grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned, grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned, grid96pxCellMiddleLeftAligned, gridCellMiddleLeftAligned, gridCellMiddleLeftAligned "
						style="width: 100%">  
					<h:panelGroup>	
				     <h:outputLabel value="Recommendation Comments"/>
				    
				    </h:panelGroup>
				
				    <h:panelGroup>
				    
					 <p:inputTextarea cols="20" rows="3" value="#{approveProjectPerdiemsBean.projectPerdiemDetail.recommendationComment}"></p:inputTextarea>
					 
					</h:panelGroup>
					
			    </h:panelGrid>	
				<h:panelGroup style="float:right;margin-right:20px;">
					<p:commandButton value="Check for updates"   oncomplete="updateForm.show()"  rendered="#{approveProjectPerdiemsBean.checkForUpdatesRenderer}"/>
					<p:commandButton value="Recommend"  actionListener="#{approveProjectPerdiemsBean.recommendProjectPerdiems}"   disabled="#{approveProjectPerdiemsBean.projectPerdiemDetail.recommendationStatus eq 'RECOMMENDED'}" update="@form"/>
					
					<p:commandButton value="Reject"  actionListener="#{approveProjectPerdiemsBean.rejectRecommendProjectPerdiems}" update="@form" disabled="#{approveProjectPerdiemsBean.projectPerdiemDetail.recommendationStatus eq 'RECOMMENDED'}"/>
					
			    </h:panelGroup>
			 <p:dialog widgetVar="updateForm"  width="400" header="Perdiem details has been updated by user" hideEffect="fade" showEffect="fade"
				modal="true" id="updateForm" >
			   <h:panelGrid columns="2" >
			    <h:outputLabel value="Perdiem details has been updated by the user. Check your mail for updated details" />
			    <h:inputHidden  />
			    <h:panelGroup>
			     <p:commandButton value="Ok" actionListener="#{approveProjectPerdiemsBean.updateForm}" update="@form"></p:commandButton>
			     <p:commandButton value="Cancel" actionListener="#{approveProjectPerdiemsBean.cancelUpdate}"></p:commandButton>
			    </h:panelGroup>
			    <h:inputHidden/>
			   </h:panelGrid>
			  </p:dialog>
			
				
			
		
           
		
		</h:form>
	</ui:define>
</ui:composition>

